import 'package:flutter/material.dart';
import 'package:get/get.dart';
class CustomDrawer extends StatelessWidget {
  const CustomDrawer({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      width: MediaQuery.of(context).size.width/2,
      child: Drawer(
        child: Column(
          children: [
            SizedBox(
              height: 50,
            ),
            GestureDetector(
              onTap: (){
                Navigator.pop(context);
              },
              child: const ListTile(
                leading: CircleAvatar(
                  child: Icon(Icons.person_outlined),
                ),
                title: Text("个人中心"),
              ),
            ),

            Divider(),
            GestureDetector(
              onTap: (){
                Get.toNamed("/deliveryAddress");
                // Getx.to("/deliveryAddress");
              },
              child: const ListTile(
                leading: CircleAvatar(
                  child: Icon(Icons.location_on_outlined),
                ),
                title: Text("收货地址"),
              ),
            ),
            Divider(),
            GestureDetector(
              onTap: (){
                Navigator.pop(context);
              },
              child: const ListTile(
                leading: CircleAvatar(
                  child: Icon(Icons.perm_device_information_outlined),
                ),
                title: Text("关于我"),
              ),
            ),
            Divider(),
            GestureDetector(
              onTap: (){
                Navigator.pop(context);
              },
              child: const ListTile(
                leading: CircleAvatar(
                  child: Icon(Icons.feedback_outlined),
                ),
                title: Text("问题反馈"),
              ),
            ),
            Divider(),
            GestureDetector(
              onTap: (){
                Navigator.pop(context);
              },
              child: const ListTile(
                leading: CircleAvatar(
                  child: Icon(Icons.update_outlined),
                ),
                title: Text("版本更新"),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
